<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
function controlON(e){
	if(e==0){
		alert("普查正处于打开状态！");
		return false;
	}else{
		window.location.href="../indagate/IndagateControl.action?control_info=0";
	}
}
function controlOFF(e){
	if(e==1){
		alert("普查正处于关闭状态！");
		return false;
	}else{
		window.location.href="../indagate/IndagateControl.action?control_info=1";
	}
}
</script>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link type="text/css" rel="stylesheet" href="../js/style/validator.css"></link>

<style type="text/css" media="all">
body,div{font-size:12px;}
</style>
<body>
<jsp:include page="adminTitle.jsp" flush="true"></jsp:include>
<div id="mainpage">
  <div class="bodytitle">
    <div class="bodytitleleft"></div>
    <div class="bodytitletxt">普查控制</div>
  </div>
<form action="../manage/addAdmin.action" method="post" name="form1" id="form1">
  <table width="90%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#E2F5BC" style="margin-top:6px;">
    <tr> 
      <td align="right" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#E2F5BC" style="margin-top:6px;">普查状态:</td>
      <td ><s:property value="control_time.substring(0,4)"/>年的普查<s:if test="control_info==1">已经关闭</s:if><s:else>正在进行中</s:else> </td>
    </tr>
    <tr> 
      <td align="right"><input type="button" value="打开" onclick="controlON(<s:property value="control_info"/>)"> </td>
      <td><input type="button" value="关闭" onclick="controlOFF(<s:property value="control_info"/>)"></td>
    </tr>
  </table>
</form>

</div>
</body>
</html>
